package file;

import java.io.File;

public class FileDemo2 {
	public static void main(String[] args) {
		File f1 = new File("b.txt");
		File f2 = new File("abc");
		
		System.out.println("f1文件名:" + f1.getName());
		System.out.println("f2目录名:" + f2.getName());
		System.out.println("f1绝对路径： " + f1.getAbsolutePath());
		System.out.println("f2绝对路径:" + f2.getAbsolutePath());
		System.out.println("f1是否是文件:" + f1.isFile());
		System.out.println("f2是否是目录:" + f2.isDirectory());
	}
}
